package cn.tony.game.super_tank.msg;

import java.io.DataInputStream;
import java.io.IOException;
import java.net.Socket;

public class Messages {

    public Message relove(DataInputStream dis) throws IOException {
        int type = dis.readInt();
        System.out.println("get a msg type : " + type);

        if (type == 1) {
            return new JoinMessage();
        } else if(type==2) {
            return new TankMoveMessage();
        } else if(type ==3) {
            return new ZidanMessage();
        } else if(type == 4) {
            return new CloseMessage();
        }
        return null;
    }

    public void send(Socket socket, Message message) {

    }

}
